package com.shuai.baibi.mq;

import com.shuai.baibi.constant.BIMQConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class BIChartMessageMQProducer {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendMessage(String message) {
        rabbitTemplate.convertAndSend(BIMQConstant.BI_MQ_EXCHANGE_NAME, BIMQConstant.BI_ROUTING_KEY, message);
    }
}
